package com.company.ThreadsCommunication;


/**
 * 作者：13687
 * 日期：2017/6/5
 * 项目：ThreadPoolsDemo
 * 描述：共同操作同一个数值对象
 */
public class NumberTest {
	public static void main(String[] args) {
//		NumberHolder numberHolder = new NumberHolder();
		NumberLockHolder numberHolder = new NumberLockHolder();

		Thread t1 = new IncreaseThread(numberHolder);
		Thread t2 = new DecreaseThread(numberHolder);

		Thread t3 = new IncreaseThread(numberHolder);
		Thread t4 = new DecreaseThread(numberHolder);

		t1.start();
		t2.start();
		t3.start();
		t4.start();

	}

}
